package cn.yuanqiao.archive.wenjianzhengli.mapper;

import cn.yuanqiao.archive.appManager.domain.TenantYqdaFolder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zjj
 * @date 2023/6/26
 */
public interface TenantYqdaFolderMapper {

    int addYqdaFolder(TenantYqdaFolder yqdaFolder);

    List<String> selectFileIdByFolderId(@Param("folderId") String folderId, @Param("tableName") String tableName);
    List<String> selectFileIdByItemId(@Param("itemId") String itemId, @Param("tableName") String tableName);

    List<String> selectFolderIdByFileId(@Param("fileId") String fileId, @Param("tableName") String tableName);

    int getCountByDaIds(@Param("daIdsStr")String daIdsStr, @Param("tableName") String tableName);

    int updateFolderIdByFolderId(@Param("folderIds")String folderIdsStr, @Param("folderId")Long folderId, @Param("tableName") String tableName);

    int delYqdaFolderByFolderIds(@Param("folderIds")String folderIds, @Param("tableName") String tableName);

    int delByDaIdInt(@Param("daIds")String daIds, @Param("tableName") String tableName);

    int setFolderIdNullByFolderIds(@Param("folderIds")String folderIds, @Param("tableName") String tableName);

    Long getFolderIdBydaId(@Param("daId")Long daId, @Param("tableName") String tableName);

    TenantYqdaFolder selectByDaId(@Param("daId")Long daId, @Param("tableName") String tableName);

    int updateByDaId(TenantYqdaFolder yqdaFolder);

    List<Long> getItemIdByDaId(@Param("daIdsStr")String daIdsStr, @Param("tableName") String tableName);

    List<Long> getItemIdByFolderId(@Param("folderIdsStr")String folderIdsStr, @Param("tableName") String tableName);

    List<Long> getDaIdByItemId(@Param("itemId")String itemId, @Param("tableName") String tableName);

    int setItemIdNullByFolderId(@Param("folderIds")String folderIds, @Param("tableName") String tableName);

    List<Long> getDaIdNoFolderIdByItemId(@Param("itemId") String itemId, @Param("fileTableName") String fileTableName, @Param("tableName") String tableName);

    List<String> selectFileIdByFolderId1(@Param("folderId")String folderId, @Param("folderdatable") String folderdatable, @Param("datable") String datable);
}
